﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace mediatheque.Areas.Admin.Models
{
    public class Book : mediathequeEntities
    {


        public List<oeuvre> getBooks()
        {
            var list = from m in this.oeuvres
                       where m.type == "livre"
                       orderby m.id descending
                       select m;
            return list.ToList();
        }

        public List<oeuvre> getBookById(int id)
        {
            var list = from m in this.oeuvres
                       where m.id == id
                       select m;

            return list.ToList();
        }





    }
}